<html>

<head>
	<style>
		.pic {
			width: 150px;
			height: 150px;
			background-image:url("image1.jpg");
		}
	</style>

	<script type="text/javascript">
		var img = new Array();
		var index = 0;
		
		function changePic() {
			document.getElementById('pic').setAttribute("style", " background-image:url(" + img[index] + ")");
			index++;
			if(index > 2) index = 0;
		}
		
		function startTimer()
		{
			var t=setInterval("changePic()",1500);
		}
				
		window.onload = function() 
		{			
			img[0] = "image1.jpg";
			img[1] = "image2.jpg";
			img[2] = "image3.jpg";
		
			startTimer();
		};
		
	</script>
</head>


<body>
	<div id="pic" class="pic">asdad</div>
</body>


</html>